<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head><title>URI Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="URI Template">
<meta name="generator" content="xml2rfc v1.33 (http://xml.resource.org/)">
<style type='text/css'><!--
        body {
                font-family: verdana, charcoal, helvetica, arial, sans-serif;
                font-size: small; color: #000; background-color: #FFF;
                margin: 2em;
        }
        h1, h2, h3, h4, h5, h6 {
                font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif;
                font-weight: bold; font-style: normal;
        }
        h1 { color: #900; background-color: transparent; text-align: right; }
        h3 { color: #333; background-color: transparent; }

        td.RFCbug {
                font-size: x-small; text-decoration: none;
                width: 30px; height: 30px; padding-top: 2px;
                text-align: justify; vertical-align: middle;
                background-color: #000;
        }
        td.RFCbug span.RFC {
                font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
                font-weight: bold; color: #666;
        }
        td.RFCbug span.hotText {
                font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
                font-weight: normal; text-align: center; color: #FFF;
        }

        table.TOCbug { width: 30px; height: 15px; }
        td.TOCbug {
                text-align: center; width: 30px; height: 15px;
                color: #FFF; background-color: #900;
        }
        td.TOCbug a {
                font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
                font-weight: bold; font-size: x-small; text-decoration: none;
                color: #FFF; background-color: transparent;
        }

        td.header {
                font-family: arial, helvetica, sans-serif; font-size: x-small;
                vertical-align: top; width: 33%;
                color: #FFF; background-color: #666;
        }
        td.author { font-weight: bold; font-size: x-small; margin-left: 4em; }
        td.author-text { font-size: x-small; }

        /* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
        a.info {
                /* This is the key. */
                position: relative;
                z-index: 24;
                text-decoration: none;
        }
        a.info:hover {
                z-index: 25;
                color: #FFF; background-color: #900;
        }
        a.info span { display: none; }
        a.info:hover span.info {
                /* The span will display just on :hover state. */
                display: block;
                position: absolute;
                font-size: smaller;
                top: 2em; left: -5em; width: 15em;
                padding: 2px; border: 1px solid #333;
                color: #900; background-color: #EEE;
                text-align: left;
        }

        a { font-weight: bold; }
        a:link    { color: #900; background-color: transparent; }
        a:visited { color: #633; background-color: transparent; }
        a:active  { color: #633; background-color: transparent; }

        p { margin-left: 2em; margin-right: 2em; }
        p.copyright { font-size: x-small; }
        p.toc { font-size: small; font-weight: bold; margin-left: 3em; }
        table.toc { margin: 0 0 0 3em; padding: 0; border: 0; vertical-align: text-top; }
        td.toc { font-size: small; font-weight: bold; vertical-align: text-top; }

        ol.text { margin-left: 2em; margin-right: 2em; }
        ul.text { margin-left: 2em; margin-right: 2em; }
        li      { margin-left: 3em; }

        /* RFC-2629 <spanx>s and <artwork>s. */
        em     { font-style: italic; }
        strong { font-weight: bold; }
        dfn    { font-weight: bold; font-style: normal; }
        cite   { font-weight: normal; font-style: normal; }
        tt     { color: #036; }
        tt, pre, pre dfn, pre em, pre cite, pre span {
                font-family: "Courier New", Courier, monospace; font-size: small;
        }
        pre {
                text-align: left; padding: 4px;
                color: #000; background-color: #CCC;
        }
        pre dfn  { color: #900; }
        pre em   { color: #66F; background-color: #FFC; font-weight: normal; }
        pre .key { color: #33C; font-weight: bold; }
        pre .id  { color: #900; }
        pre .str { color: #000; background-color: #CFF; }
        pre .val { color: #066; }
        pre .rep { color: #909; }
        pre .oth { color: #000; background-color: #FCF; }
        pre .err { background-color: #FCC; }

        /* RFC-2629 <texttable>s. */
        table.all, table.full, table.headers, table.none {
                font-size: small; text-align: center; border-width: 2px;
                vertical-align: top; border-collapse: collapse;
        }
        table.all, table.full { border-style: solid; border-color: black; }
        table.headers, table.none { border-style: none; }
        th {
                font-weight: bold; border-color: black;
                border-width: 2px 2px 3px 2px;
        }
        table.all th, table.full th { border-style: solid; }
        table.headers th { border-style: none none solid none; }
        table.none th { border-style: none; }
        table.all td {
                border-style: solid; border-color: #333;
                border-width: 1px 2px;
        }
        table.full td, table.headers td, table.none td { border-style: none; }

        hr { height: 1px; }
        hr.insert {
                width: 80%; border-style: none; border-width: 0;
                color: #CCC; background-color: #CCC;
        }
--></style>
</head>
<body>
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1">
<tr><td class="header">Network Working Group</td><td class="header">J. Gregorio, Ed.</td></tr>
<tr><td class="header">Internet-Draft</td><td class="header">Google</td></tr>
<tr><td class="header">Intended status: Standards Track</td><td class="header">M. Hadley, Ed.</td></tr>
<tr><td class="header">Expires: September 27, 2008</td><td class="header">Sun Microsystems</td></tr>
<tr><td class="header">&nbsp;</td><td class="header">M. Nottingham, Ed.</td></tr>
<tr><td class="header">&nbsp;</td><td class="header">&nbsp;</td></tr>
<tr><td class="header">&nbsp;</td><td class="header">D. Orchard</td></tr>
<tr><td class="header">&nbsp;</td><td class="header">BEA Systems, Inc.</td></tr>
<tr><td class="header">&nbsp;</td><td class="header">Mar 26, 2008</td></tr>
</table></td></tr></table>
<h1><br />URI Template<br />draft-gregorio-uritemplate-03</h1>

<h3>Status of this Memo</h3>
<p>
By submitting this Internet-Draft,
each author represents that any applicable patent or other IPR claims of which
he or she is aware have been or will be disclosed,
and any of which he or she becomes aware will be disclosed,
in accordance with Section&nbsp;6 of BCP&nbsp;79.</p>
<p>
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups.
Note that other groups may also distribute working documents as
Internet-Drafts.</p>
<p>
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any time.
It is inappropriate to use Internet-Drafts as reference material or to cite
them other than as &ldquo;work in progress.&rdquo;</p>
<p>
The list of current Internet-Drafts can be accessed at
<a href='http://www.ietf.org/ietf/1id-abstracts.txt'>http://www.ietf.org/ietf/1id-abstracts.txt</a>.</p>
<p>
The list of Internet-Draft Shadow Directories can be accessed at
<a href='http://www.ietf.org/shadow.html'>http://www.ietf.org/shadow.html</a>.</p>
<p>
This Internet-Draft will expire on September 27, 2008.</p>

<h3>Abstract</h3>

<p>
                   A URI Template is a compact sequence of characters
                   used for the construction of URIs.
                   This specification defines the URI Template
                   syntax and the process for expanding a URI Template into a
                   URI, along with guidelines and security considerations for the
                   use of URI Templates on the Internet.
                   The URI Template syntax allows for the construction
                   of strings that are a superset of URIs, allowing an implementation
                   to process any URI Template without knowing the scheme-specific
                   requirements of every possible resulting URI.
               
</p>
<h3>Editorial Note</h3>

<p>To provide feedback on this Internet-Draft, join the
                   <a href='http://lists.w3.org/Archives/Public/uri/'>W3C URI mailing
                       list (http://lists.w3.org/Archives/Public/uri/)</a>.
               
</p><a name="toc"></a><br /><hr />
<h3>Table of Contents</h3>
<p class="toc">
<a href="#anchor1">1.</a>&nbsp;
Introduction<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor2">1.1.</a>&nbsp;
Overview<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor3">1.2.</a>&nbsp;
Design Considerations<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor4">1.3.</a>&nbsp;
Applicability<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#anchor5">1.4.</a>&nbsp;
Notational Conventions<br />
<a href="#anchor6">2.</a>&nbsp;
Characters<br />
<a href="#anchor7">3.</a>&nbsp;
Terminology<br />
<a href="#anchor8">4.</a>&nbsp;
URI Template<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#variables">4.1.</a>&nbsp;
Variables<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#expansions">4.2.</a>&nbsp;
Template Expansions<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#error">4.3.</a>&nbsp;
Error Handling<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#evaluating">4.4.</a>&nbsp;
URI Template Substitution<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#var">4.4.1.</a>&nbsp;
('var') substitution<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#opt">4.4.2.</a>&nbsp;
The 'opt' operator<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#neg">4.4.3.</a>&nbsp;
The 'neg' operator<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#prefix">4.4.4.</a>&nbsp;
The 'prefix' operator<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#append">4.4.5.</a>&nbsp;
The 'suffix' operator<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#join">4.4.6.</a>&nbsp;
The 'join' operator<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#list">4.4.7.</a>&nbsp;
The 'list' operator<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#examples">4.5.</a>&nbsp;
Examples<br />
<a href="#anchor9">5.</a>&nbsp;
Security Considerations<br />
<a href="#iana">6.</a>&nbsp;
IANA Considerations<br />
<a href="#appendix_a">7.</a>&nbsp;
Appendix A - Parsing URI Template Expansions<br />
<a href="#rfc.references1">8.</a>&nbsp;
Normative References<br />
<a href="#anchor11">Appendix&nbsp;A.</a>&nbsp;
Contributors<br />
<a href="#anchor12">Appendix&nbsp;B.</a>&nbsp;
Revision History<br />
<a href="#rfc.authors">&#167;</a>&nbsp;
Authors' Addresses<br />
<a href="#rfc.copyright">&#167;</a>&nbsp;
Intellectual Property and Copyright Statements<br />
</p>
<br clear="all" />

<a name="anchor1"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.1"></a><h3>1.&nbsp;
Introduction</h3>

<p>
                   A URI Template provides a simple and extensible format
                   for URI construction.  A URI Template is a string that
                   contains embedded expansions, text marked off in matching
                   braces ('{', '}'), that denotes a part of the string that is
                   to be substituted by a template processor to
                   produce a URI.  A URI Template is transformed into a URI by
                   substituting the expansions with their calculated value.
               
</p>
<p>
                   Several specifications have defined URI Templates
                   with varying levels of formality, such as WSDL, WADL and OpenSearch.  This
                   specification is derived from these concepts, giving a
                   rigorous definition to such templates.
               
</p>
<p>
                   This specification uses the terms "character" and "coded
                   character set" in accordance with the definitions provided
                   in <a class='info' href='#RFC2978'>[RFC2978]<span> (</span><span class='info'>Freed, N. and J. Postel, &ldquo;IANA Charset Registration Procedures,&rdquo; October&nbsp;2000.</span><span>)</span></a>, and "character encoding" in place of what
                   <a class='info' href='#RFC2978'>[RFC2978]<span> (</span><span class='info'>Freed, N. and J. Postel, &ldquo;IANA Charset Registration Procedures,&rdquo; October&nbsp;2000.</span><span>)</span></a> refers to as a "charset".
               
</p>
<a name="anchor2"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.1.1"></a><h3>1.1.&nbsp;
Overview</h3>

<p>
                       A URI Template allows a structural description of URIs
                       while allowing a consumer of the template to construct a
                       final URI by providing the values of the expansion
                       variables. For example, given the following URI Template:
                   
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
    http://www.example.com/users/{userid}</pre></div>
<p>And the following variable value
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
    userid := "fred"</pre></div>
<p>The expansion of the URI Template is:
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
    http://www.example.com/users/fred</pre></div>
<p>
		     Here is an example that constructs a query
		     from multiple variables:
		   
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
    http://www.example.com/?{-join|&amp;|query,number}</pre></div>
<p>And the following variables
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
    query  := "mycelium"
    number := 100</pre></div>
<p>The expansion of the URI Template is:
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
  http://www.example.com/?query=mycelium&amp;number=100</pre></div>
<p>
		     The template expansion describes in a machine
		     readable manner how the URI is to be constructed.
		   
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
  http://www.example.com/?{-join|&amp;|query,number}
                          \____________________/
                                   |
                                   |
        Join 'var=value' for each variable
        in ['query', 'number'] with '&amp;'.
</pre></div>
<a name="anchor3"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.1.2"></a><h3>1.2.&nbsp;
Design Considerations</h3>

<p>
                       The URI Template syntax has been designed to carefully balance
                       the need for a powerful substitution mechanism with ease
                       of implementation and security. The syntax is designed
                       to be easy to parse while at the same time providing
                       enough flexibility to express many common templating
                       scenarios.
                   
</p>
<p>
                       Another consideration was to keep the syntax and processing
                       in-line with the pre-existing templating schemes present
                       in OpenSearch, WSDL and WADL.
                   
</p>
<p>
                       The final design consideration was control over
                       the placement of reserved characters in the
                       URI generated from a URI Template. The reserved characters
                       in a URI Template can only appear in the non-expansion
                       text, or in the argument to an operator, both locations
                       are dictated by the URI Template author. Given
                       the percent-encoding rules for variable values
                       this means that the source of all structure, i.e
                       reserved characters, in a URI generated from a
                       URI Template is decided by the URI Template author.
                   
</p>
<a name="anchor4"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.1.3"></a><h3>1.3.&nbsp;
Applicability</h3>

<p>
		   While URI Templates use a notation that is similar to some URI path matching
		   notations in web frameworks, URI Templates were not designed for that use case,
		   nor are they appropriate for that purpose.
		   URI Templates are not URIs, they do not identify an abstract or physical
		   resource, they are not to be treated like URIs,
		   nor should not be used in places where a URI would be expected.
		 
</p>
<a name="anchor5"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.1.4"></a><h3>1.4.&nbsp;
Notational Conventions</h3>

<p>
                       This specification uses the Augmented Backus-Naur Form
                       (ABNF) notation of <a class='info' href='#RFC5234'>[RFC5234]<span> (</span><span class='info'>Crocker, D. and P. Overell, &ldquo;Augmented BNF for Syntax Specifications: ABNF,&rdquo; January&nbsp;2008.</span><span>)</span></a>, including
                       the following core ABNF syntax rules defined by that
                       specification: ALPHA (letters) and DIGIT (decimal
                       digits).  See <a class='info' href='#RFC3986'>[RFC3986]<span> (</span><span class='info'>Berners-Lee, T., Fielding, R., and L. Masinter, &ldquo;Uniform Resource Identifier (URI): Generic Syntax,&rdquo; January&nbsp;2005.</span><span>)</span></a> for the
                       definitions of the URI-reference, percent-encoded,
                       reserved, and unreserved rules.  
</p>
<p>
                       The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
                       "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",
                       "MAY", and "OPTIONAL" in this document are to be
                       interpreted as described in <a class='info' href='#RFC2119'>[RFC2119]<span> (</span><span class='info'>Bradner, S., &ldquo;Key words for use in RFCs to Indicate Requirement Levels,&rdquo; March&nbsp;1997.</span><span>)</span></a>.
                   
</p>
<a name="anchor6"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.2"></a><h3>2.&nbsp;
Characters</h3>

<p>
                   A URI Template is a sequence of characters, and has the same
                   issues as URIs with regard to codepoints and character sets.
                   That is, URI Template characters are frequently encoded
                   as octets for transport or presentation.  This specification
                   does not mandate any particular character encoding for
                   mapping between URI characters and the octets used to store
                   or transmit those characters.  When a URI appears in a
                   protocol element, the character encoding is defined by that
                   protocol; without such a definition, a URI is assumed to be
                   in the same character encoding as the surrounding text.
               
</p>
<p>
                   The ABNF notation defines its terminal values to be
                   non-negative integers (codepoints) based on the US-ASCII
                   coded character set <a class='info' href='#ASCII'>[ASCII]<span> (</span><span class='info'>American National Standards Institute, &ldquo;Coded Character Set - 7-bit American Standard Code for Information Interchange,&rdquo; 1986.</span><span>)</span></a>.  Because a URI is a sequence of
                   characters, we must invert that relation in order to
                   understand the URI syntax.  Therefore, the integer values
                   used by the ABNF must be mapped back to their corresponding
                   characters via US-ASCII in order to complete the syntax
                   rules.
               
</p>
<a name="anchor7"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.3"></a><h3>3.&nbsp;
Terminology</h3>

<p>
	       </p>
<ul class="text">
<li>
		   template processor - A program or library that converts a URI
		   Template into a URI.
		 
</li>
<li>
		   template expansion - The text between '{' and '}', including the
		   enclosing brackets.
		 
</li>
</ul><p>
	     
</p>
<a name="anchor8"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4"></a><h3>4.&nbsp;
URI Template</h3>

<p>
                   A URI Template is a sequence of characters that contains any number of
		   embedded template expansions, see <a class='info' href='#expansions'>Section&nbsp;4.2<span> (</span><span class='info'>Template Expansions</span><span>)</span></a>.
		   Each expansion references one or
		   more variables whose values are used when determining the
		   substition value for an expansion.  A URI Template becomes a
		   URI when all the template expansions are substituted with their
		   values (see <a class='info' href='#evaluating'>Section&nbsp;4.4<span> (</span><span class='info'>URI Template Substitution</span><span>)</span></a>). The generated
		   URI will be a URI-reference, i.e. either an absolute
		   URI or a relative reference.
               
</p>
<a name="variables"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.1"></a><h3>4.1.&nbsp;
Variables</h3>

<p>
		     Every variable is either a Unicode string or a list of Unicode strings.
		   
</p>
<p>
		     A template expansion MAY reference variables that are unknown
		     to the template processor. Those variables are 'undefined'
		     and template expansion takes into consideration 'undefined' variables.
		     Conversely, every variable that he template processor knows about
		     is considered 'defined'.
		   
</p>
<p>
                       A variable that contains a string
		       of length zero MUST NOT be considered 'undefined' by the template processor.
		       A list variable that contains no members, that is of zero length, MUST NOT
		       be considered 'undefined' by the template processor.
		   
</p>
<p>
		       Beyond the scope of this
                       specification is the allowable programming constructs
                       that can be used for a list variable. For example, a Python
                       implementation might allow only built-in list types, or
                       it may allow any iterable to be used as the source for a
                       list variable.
                   
</p>
<p>
		     Some variables may be supplied with default values. The default
		     value must comde from ( unreserved / pct-encoded ). Note that 
		     there is no notation for supplying default values to list variables.
		   
</p>
<p>
                       A variable may appear in more than one expansion in a
                       URI Template. The value used for that variable MUST
                       remain the same for every template expansion when
                       converting a URI Template into a URI.
                   
</p>
<a name="expansions"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.2"></a><h3>4.2.&nbsp;
Template Expansions</h3>

<p>
                       Template expansions are the parameterized components of a URI Template.
                       A template expansion MUST match the 'expansion' rule.
                   
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 op          = 1*ALPHA
 arg         = *(reserved / unreserved / pct-encoded)
 var         = varname [ "=" vardefault ]
 vars        = var [ *("," var) ]
 varname     = (ALPHA / DIGIT)*(ALPHA / DIGIT / "." / "_" / "-" )
 vardefault  = *(unreserved / pct-encoded)
 operator    = "-" op "|" arg "|" vars
 expansion   = "{" ( var / operator ) "}"

</pre></div>
<a name="error"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.3"></a><h3>4.3.&nbsp;
Error Handling</h3>

<p>
		     During template substitution error conditions may arise.
		     The exact circumstances for those errors are described in
		     <a class='info' href='#evaluating'>Section&nbsp;4.4<span> (</span><span class='info'>URI Template Substitution</span><span>)</span></a>. When an error occurs the
		     template processor MUST NOT return a URI. It is language
		     specific and beyond the scope of this document how the
		     template processor signals that an error has occured and that
		     a URI will not be generated from the template.
		   
</p>
<a name="evaluating"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4"></a><h3>4.4.&nbsp;
URI Template Substitution</h3>

<p>
		     Template substitution is the process of turning
		     a URI Template into a URI given definitions
		     for the variables used in the template. Substitution
		     replaces each expansion with its calculated value.
		     A template processor take two inputs, a URI Template and
		     a set of variables, and returns a URI-reference.

                   
</p>
<p>
		       Before substitution the template processor MUST convert
		       every variable value into a sequence of characters in ( unreserved / pct-encoded ).
		       The template processor does that using the following algorithm:
		       The template processor normalizes the string using NFKC, converts it to
                       UTF-8 <a class='info' href='#RFC3629'>[RFC3629]<span> (</span><span class='info'>Yergeau, F., &ldquo;UTF-8, a transformation format of ISO 10646,&rdquo; November&nbsp;2003.</span><span>)</span></a>, and then
                       every octet of the UTF-8 string that falls outside of
		       ( unreserved ) MUST be percent-encoded, as
                       per <a class='info' href='#RFC3986'>[RFC3986]<span> (</span><span class='info'>Berners-Lee, T., Fielding, R., and L. Masinter, &ldquo;Uniform Resource Identifier (URI): Generic Syntax,&rdquo; January&nbsp;2005.</span><span>)</span></a>, section 2.1.
		       For variables that are lists, the above algorithm is applied
		       to each value in the list.
                   
</p>
<p>
                       The Unicode Standard <a class='info' href='#UNIV4'>[UNIV4]<span> (</span><span class='info'>The Unicode Consortium, &ldquo;The Unicode Standard, Version                   4.0.1, defined by: The Unicode Standard, Version 4.0                   (Reading, MA, Addison-Wesley, 2003. ISBN                   0-321-18578-1), as amended by Unicode 4.0.1                   (http://www.unicode.org/versions/Unicode4.0.1/),&rdquo; March&nbsp;2004.</span><span>)</span></a> defines various
                       equivalences between sequences of characters for various
                       purposes.  Unicode Standard Annex #15 <a class='info' href='#UTR15'>[UTR15]<span> (</span><span class='info'>Davis, M. and M. Duerst, &ldquo;Unicode Normalization Forms,&rdquo; April&nbsp;2003.</span><span>)</span></a> defines
                       various Normalization Forms for these equivalences, in
                       particular Normalization Form KC (NFKC, Compatibility
                       Decomposition, followed by Canonical Composition). Since
                       different Normalized Forms unicode strings will have
                       different UTF-8 represenations the only way to guarantee
		       that template processors will produce the same URI is to
		       require a common Normalized Form.
                   
</p>
<p>
		     Requiring that all characters outside of ( unreserved ) be
		     percent encoded means that the only characters outside of
		     ( unreserved ) that will appear in the generated URI-reference
		     will come from outside the template expansions in the URI Template or
		     from the argument of a template expansion. This means that the
		     designer of the URI Template determines the placement of reserved characters in the
		     resulting URI, and thus the structure of the resulting generated URI-reference.
		   
</p>
<p>
                       If the expansion is an operator then the substitution value
                       is determined by the given operator. Each operator
                       works only on the variables that are defined within
                       their expansion.
                   
</p>
<p>
                       The result of substitution
                       MUST match the URI-reference rule and SHOULD also match
                       any known rules for the scheme of the resulting URI.
                   
</p>
<p>
		     If a template processor encounters an operator that it does not
		     understand then it MUST fail and MUST NOT produce a URI from
		     the URI Template. The list of operators that a template processor
		     knows is not constrained by this specification, that is, later
		     specifications may add new operators.
		   
</p>
<p>
                       Every expansion consists of either a variable ('var') or
                       an operator expression ('operator'), and the rules for how
		       to expand each of these is given below. For every expansion
		       a template MUST have at least one variable name in the 
		       template expansion. It is an error if no variables are supplied. 
		       All of the variables supplied to a template expansion MAY be undefined
		       and the expansion rules below specify how to process the template expansion
		       in that situation.
		   
</p>
<a name="var"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.1"></a><h3>4.4.1.&nbsp;
('var') substitution</h3>

<p>
			 In a variable ('var')
			 expansion, if the variable is defined then
			 substitute the value of the variable, otherwise
			 substitute the default value. If no default value is
			 given then substitute with the empty string.
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
foo := "fred"

"{foo}"        -&gt; "fred"
"{bar=wilma}"  -&gt; "wilma"
"{baz}"        -&gt; ""
</pre></div><p>

		       
</p>
<a name="opt"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.2"></a><h3>4.4.2.&nbsp;
The 'opt' operator</h3>

<p>
			   If each variable is undefined or an empty list
			   then substitute the empty string, otherwise
			   substitute the value of 'arg'.
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 foo := "fred"

 "{-opt|fred@example.org|foo}" -&gt; "fred@example.org"
 "{-opt|fred@example.org|bar}" -&gt; ""
</pre></div><p>

		       
</p>
<a name="neg"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.3"></a><h3>4.4.3.&nbsp;
The 'neg' operator</h3>

<p>
                           If each variable is undefined or an empty list
                           then substitute the value of arg, otherwise
                           substitute the empty string.
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 foo := "fred"

 "{-neg|fred@example.org|foo}" -&gt; ""
 "{-neg|fred@example.org|bar}" -&gt; "fred@example.org"
</pre></div><p>

		       
</p>
<a name="prefix"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.4"></a><h3>4.4.4.&nbsp;
The 'prefix' operator</h3>

<p>
                           The prefix operator MUST only have one variable in
                           its expansion. More than one variable is an error condition.
			   If the variable is undefined or an empty
			   list then substitute the empty string. If the variable
			   is a defined non-list then substitute the value of arg preceeded
                           by the value of the variable. If the variable is a defined list
			   then substitute the concatenation of every list value preceeded
			   by the arg.
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 foo := "fred"
 bar := ["fee", "fi", "fo", "fum"]
 baz := []

 "{-prefix|/|foo}" -&gt; "/fred"
 "{-prefix|/|bar}" -&gt; "/fee/fi/fo/fum"
 "{-prefix|/|baz}" -&gt; ""
 "{-prefix|/|qux}" -&gt; ""
</pre></div><p>

		       
</p>
<a name="append"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.5"></a><h3>4.4.5.&nbsp;
The 'suffix' operator</h3>

<p>
                           The prefix operator MUST only have one variable in
                           its expansion. More than one variable is an error condition.
			   If the variable is undefined or an empty
			   list then substitute the empty string. If the variable
			   is a defined non-list then substitute the value of arg followed
                           by the value of the variable. If the variable is a defined list
			   then substitute the concatenation of every list value followed
			   by the arg.
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 foo := "fred"
 bar := ["fee", "fi", "fo", "fum"]
 baz := []

 "{-suffix|/|foo}" -&gt; "fred/"
 "{-suffix|/|bar}" -&gt; "fee/fi/fo/fum/"
 "{-suffix|/|baz}" -&gt; ""
 "{-suffix|/|qux}" -&gt; ""
</pre></div><p>

		       
</p>
<a name="join"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.6"></a><h3>4.4.6.&nbsp;
The 'join' operator</h3>

<p>
			 Supplying a list variable to the join operator
			 is an error. For each variable that is defined and non-empty
			 create a keyvalue string that is the concatenation
			 of the variable name, "=", and the
			 variable value. Concatenate more than one keyvalue
			 string with intervening values of arg to
			 create the substitution value. The order of variables
			 MUST be preserved during substitution. 
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 foo := "fred"
 bar := "barney"
 baz := ""

 "{-join|&amp;|foo,bar,baz,qux}" -&gt; "foo=fred&amp;bar=barney&amp;baz="
 "{-join|&amp;|bar}" -&gt; "bar=barney"
 "{-join|&amp;|qux}" -&gt; ""
</pre></div><p>

		       
</p>
<a name="list"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.4.7"></a><h3>4.4.7.&nbsp;
The 'list' operator</h3>

<p>
                           The listjoin operator MUST have only one variable
                           in its expansion and that variable must be a list.
			   More than one variable is an error.
                           If the list is non-empty then substitute
                           the concatenation of all the list members with intervening
                           values of arg. If the list is empty or the variable is undefined them 
			   substitute the empty string.
                       
</p>
<p>
			 Example:
			 </p>
<div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 foo := ["fred", "barney", "wilma"]
 bar := ["a", "", "c"]
 baz := ["betty"]
 qux := []

 "{-list|/|foo}" -&gt; "fred/barney/wilma"
 "{-list|/|bar}" -&gt; "a//c"
 "{-list|/|baz}" -&gt; "betty"
 "{-list|/|qux}" -&gt; ""
 "{-list|/|corge}" -&gt; ""
</pre></div><p>

		       
</p>
<a name="examples"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.4.5"></a><h3>4.5.&nbsp;
Examples</h3>
<br /><hr class="insert" />
<a name="example-table"></a>

<p style='text-align: center'>
                           Given the following template variable names and
                           values:
                       
</p><table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left">
<tr><th align="left">Name</th><th align="left">Value</th></tr>
<tr>
<td align="left">foo</td>
<td align="left">\u03d3</td>
</tr>
<tr>
<td align="left">bar</td>
<td align="left">fred</td>
</tr>
<tr>
<td align="left">baz</td>
<td align="left">10,20,30</td>
</tr>
<tr>
<td align="left">qux</td>
<td align="left">["10","20","30"]</td>
</tr>
<tr>
<td align="left">corge</td>
<td align="left">[]</td>
</tr>
<tr>
<td align="left">grault</td>
<td align="left">&nbsp;</td>
</tr>
<tr>
<td align="left">garply</td>
<td align="left">a/b/c</td>
</tr>
<tr>
<td align="left">waldo</td>
<td align="left">ben &amp; jerrys</td>
</tr>
<tr>
<td align="left">fred</td>
<td align="left">["fred", "", "wilma"]</td>
</tr>
<tr>
<td align="left">plugh</td>
<td align="left">["\u017F\u0307", "\u0073\u0307"]</td>
</tr>
<tr>
<td align="left">1-a_b.c</td>
<td align="left">200</td>
</tr>
</table>
<br clear="all" />
<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b>&nbsp;Table 1&nbsp;</b></font><br /></td></tr></table><hr class="insert" />

<p>
		     The variable 'foo' is the unicode character GREEK UPSILON WITH ACUTE AND HOOK SYMBOL.
		     This character was chosen because it is one of only three characters that has
		     a different normal form for each of the four normalization forms (NFC, NFD, NFKC, NFKD).
                       The name 'xyzzy' has not been defined, the value of 'grault' is the empty string.
		       The variables qux, corge, fred, and plugh are lists.
                   
</p>
<p>The following URI Templates will be expanded as shown:
</p>
<p>    ----
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 http://example.org/?q={bar}
 http://example.org/?q=fred

 /{xyzzy}
 /

 http://example.org/?{-join|&amp;|foo,bar,xyzzy,baz}
 http://example.org/?foo=%CE%8E&amp;bar=fred&amp;baz=10%2C20%2C30

 http://example.org/?d={-list|,|qux}
 http://example.org/?d=10,20,30

 http://example.org/?d={-list|&amp;d=|qux}
 http://example.org/?d=10&amp;d=20&amp;d=30

 http://example.org/{bar}{bar}/{garply}
 http://example.org/fredfred/a%2Fb%2Fc

 http://example.org/{bar}{-prefix|/|fred}
 http://example.org/fred/fred//wilma

 {-neg|:|corge}{-suffix|:|plugh}
 :%E1%B9%A1:%E1%B9%A1:

 ../{waldo}/
 ../ben%20%26%20jerrys/

 telnet:192.0.2.16{-opt|:80|grault}
 telnet:192.0.2.16:80

  :{1-a_b.c}:
  :200:
</pre></div>
<p>    ----
</p>
<a name="anchor9"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.5"></a><h3>5.&nbsp;
Security Considerations</h3>

<p>
                   A URI Template does not contain active or executable content. Other
                   security considerations are the same as those for URIs, see section 7
                   of RFC3986.
               
</p>
<a name="iana"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.6"></a><h3>6.&nbsp;
IANA Considerations</h3>

<p>
                   In common with RFC3986, URI scheme names form a registered
                   namespace that is managed by IANA according to the
                   procedures defined in <a class='info' href='#RFC4395'>[RFC4395]<span> (</span><span class='info'>Hansen, T., Hardie, T., and L. Masinter, &ldquo;Guidelines and Registration Procedures for New URI Schemes,&rdquo; February&nbsp;2006.</span><span>)</span></a>.  No IANA
                   actions are required by this document.
               
</p>
<a name="appendix_a"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.7"></a><h3>7.&nbsp;
Appendix A - Parsing URI Template Expansions</h3>

<p>
                   Parsing a valid URI Template expansion does not require
                   building a parser from the given ABNF. Instead, the set of allowed
                   characters in each part of URI Template expansion has been
                   chosen to avoid complex parsing, and breaking an expansion into
                   its component parts can be achieved by a series of splits
                   of the character string.
               
</p>
<p>
                   Here is example Python code that parses a URI Template
                   expansion and returns the operator, argument, and
                   variables as a tuple. The variables are returned
                   as a dictionary of variable names mapped to their
                   default values. If no default is given then the
                   name maps to None.
               
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
 def parse_expansion(expansion):
    if "|" in expansion:
        (op, arg, vars_) = expansion.split("|")
        op = op[1:]
    else:
        (op, arg, vars_) = (None, None, expansion)
    vars_ = vars_.split(",")

    variables = {}
    for var in vars_:
        if "=" in var:
            (varname, vardefault) = var.split("=")
        else:
            (varname, vardefault) = (var, None)
        variables[varname] = vardefault

    return (op, arg, variables)
</pre></div>
<p>
                   And here is an example of the parse_expansion() function being
                   used.
               
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
&gt;&gt;&gt; parse_expansion("-join|&amp;|a,b,c=1")
('join', '&amp;', {'a': None, 'c': '1', 'b': None})
&gt;&gt;&gt; parse_expansion("c=1")
(None, None, {'c': '1'})
</pre></div>
<a name="rfc.references1"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<h3>8.&nbsp;Normative References</h3>
<table width="99%" border="0">
<tr><td class="author-text" valign="top"><a name="ASCII">[ASCII]</a></td>
<td class="author-text">American National Standards Institute, &ldquo;Coded Character Set - 7-bit American Standard Code for Information Interchange,&rdquo; ANSI&nbsp;X3.4, 1986.</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2119">[RFC2119]</a></td>
<td class="author-text"><a href="mailto:sob@harvard.edu">Bradner, S.</a>, &ldquo;<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>,&rdquo; BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997 (<a href="ftp://ftp.isi.edu/in-notes/rfc2119.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2119.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2119.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2978">[RFC2978]</a></td>
<td class="author-text">Freed, N. and J. Postel, &ldquo;<a href="http://tools.ietf.org/html/rfc2978">IANA Charset Registration Procedures</a>,&rdquo; BCP&nbsp;19, RFC&nbsp;2978, October&nbsp;2000 (<a href="ftp://ftp.isi.edu/in-notes/rfc2978.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC3629">[RFC3629]</a></td>
<td class="author-text">Yergeau, F., &ldquo;<a href="http://tools.ietf.org/html/rfc3629">UTF-8, a transformation format of ISO 10646</a>,&rdquo; STD&nbsp;63, RFC&nbsp;3629, November&nbsp;2003 (<a href="ftp://ftp.isi.edu/in-notes/rfc3629.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC3986">[RFC3986]</a></td>
<td class="author-text">Berners-Lee, T., Fielding, R., and L. Masinter, &ldquo;<a href="http://tools.ietf.org/html/rfc3986">Uniform Resource Identifier (URI): Generic Syntax</a>,&rdquo; STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005 (<a href="ftp://ftp.isi.edu/in-notes/rfc3986.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC4395">[RFC4395]</a></td>
<td class="author-text">Hansen, T., Hardie, T., and L. Masinter, &ldquo;<a href="http://tools.ietf.org/html/rfc4395">Guidelines and Registration Procedures for New URI Schemes</a>,&rdquo; BCP&nbsp;115, RFC&nbsp;4395, February&nbsp;2006 (<a href="ftp://ftp.isi.edu/in-notes/rfc4395.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC5234">[RFC5234]</a></td>
<td class="author-text">Crocker, D. and P. Overell, &ldquo;<a href="http://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>,&rdquo; STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008 (<a href="ftp://ftp.isi.edu/in-notes/rfc5234.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="UNIV4">[UNIV4]</a></td>
<td class="author-text">The Unicode Consortium, &ldquo;The Unicode Standard, Version
                  4.0.1, defined by: The Unicode Standard, Version 4.0
                  (Reading, MA, Addison-Wesley, 2003. ISBN
                  0-321-18578-1), as amended by Unicode 4.0.1
                  (http://www.unicode.org/versions/Unicode4.0.1/),&rdquo; March&nbsp;2004.</td></tr>
<tr><td class="author-text" valign="top"><a name="UTR15">[UTR15]</a></td>
<td class="author-text">Davis, M. and M. Duerst, &ldquo;<a href="http://www.unicode.org/unicode/reports/tr15/tr15-23.html">Unicode Normalization Forms</a>,&rdquo; Unicode Standard Annex #&nbsp;15, April&nbsp;2003.</td></tr>
</table>

<a name="anchor11"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.A"></a><h3>Appendix A.&nbsp;
Contributors</h3>

<p>
                   The following people made significant contributions to this
                   specification: Michaeljohn Clement, DeWitt Clinton, John Cowan, James H. Manger, and James Snell.
               
</p>
<a name="anchor12"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<a name="rfc.section.B"></a><h3>Appendix B.&nbsp;
Revision History</h3>

<p>03 - Added more examples. Introduced error conditions and defined
	     their handling. Changed listjoin to list. Changed -append to -suffix,
	     and allowed -prefix and -suffix to accept list variables. Clarified
	     the handling of unicode.
</p>
<p>02 - Added operators and came up with coherent
                   percent-encoding and reserved character story.
                    Added large examples section which is extracted
                   and tested against the implementation.
               
</p>
<p>01
               
</p>
<p>00 - Initial Revision.
               
</p>
<a name="rfc.authors"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<h3>Authors' Addresses</h3>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Joe Gregorio (editor)</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Google</td></tr>
<tr><td class="author" align="right">Email:&nbsp;</td>
<td class="author-text"><a href="mailto:joe@bitworking.org">joe@bitworking.org</a></td></tr>
<tr><td class="author" align="right">URI:&nbsp;</td>
<td class="author-text"><a href="http://bitworking.org/">http://bitworking.org/</a></td></tr>
<tr cellpadding="3"><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Marc Hadley (editor)</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Sun Microsystems</td></tr>
<tr><td class="author" align="right">Email:&nbsp;</td>
<td class="author-text"><a href="mailto:Marc.Hadley@sun.com">Marc.Hadley@sun.com</a></td></tr>
<tr><td class="author" align="right">URI:&nbsp;</td>
<td class="author-text"><a href="http://sun.com/">http://sun.com/</a></td></tr>
<tr cellpadding="3"><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Mark Nottingham (editor)</td></tr>
<tr><td class="author" align="right">Email:&nbsp;</td>
<td class="author-text"><a href="mailto:mnot@pobox.com">mnot@pobox.com</a></td></tr>
<tr><td class="author" align="right">URI:&nbsp;</td>
<td class="author-text"><a href="http://mnot.net/">http://mnot.net/</a></td></tr>
<tr cellpadding="3"><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">David Orchard</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">BEA Systems, Inc.</td></tr>
<tr><td class="author" align="right">Email:&nbsp;</td>
<td class="author-text"><a href="mailto:dorchard@bea.com">dorchard@bea.com</a></td></tr>
<tr><td class="author" align="right">URI:&nbsp;</td>
<td class="author-text"><a href="http://bea.com/">http://bea.com/</a></td></tr>
</table>
<a name="rfc.copyright"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc">&nbsp;TOC&nbsp;</a></td></tr></table>
<h3>Full Copyright Statement</h3>
<p class='copyright'>
Copyright &copy; The IETF Trust (2008).</p>
<p class='copyright'>
This document is subject to the rights,
licenses and restrictions contained in BCP&nbsp;78,
and except as set forth therein,
the authors retain all their rights.</p>
<p class='copyright'>
This document and the information contained herein are provided
on an &ldquo;AS IS&rdquo; basis and THE CONTRIBUTOR,
THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST
AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT
THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE.</p>
<h3>Intellectual Property</h3>
<p class='copyright'>
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed
to pertain to the implementation or use of the technology
described in this document or the extent to which any license
under such rights might or might not be available; nor does it
represent that it has made any independent effort to identify any
such rights.
Information on the procedures with respect to
rights in RFC documents can be found in BCP&nbsp;78 and BCP&nbsp;79.</p>
<p class='copyright'>
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available,
or the result of an attempt made to obtain a general license or
permission for the use of such proprietary rights by implementers or
users of this specification can be obtained from the IETF on-line IPR
repository at <a href='http://www.ietf.org/ipr'>http://www.ietf.org/ipr</a>.</p>
<p class='copyright'>
The IETF invites any interested party to bring to its attention
any copyrights,
patents or patent applications,
or other
proprietary rights that may cover technology that may be required
to implement this standard.
Please address the information to the IETF at <a href='mailto:ietf-ipr@ietf.org'>ietf-ipr@ietf.org</a>.</p>
</body></html>
